﻿using System;

namespace UniRx.Operators
{
	// Token: 0x020002DB RID: 731
	internal class ImmediateReturnObservable<T> : IObservable<T>, IOptimizedObservable<T>
	{
		// Token: 0x06000F9E RID: 3998 RVA: 0x0004881F File Offset: 0x00046C1F
		public ImmediateReturnObservable(T value)
		{
			this.value = value;
		}

		// Token: 0x06000F9F RID: 3999 RVA: 0x0004882E File Offset: 0x00046C2E
		public bool IsRequiredSubscribeOnCurrentThread()
		{
			return false;
		}

		// Token: 0x06000FA0 RID: 4000 RVA: 0x00048831 File Offset: 0x00046C31
		public IDisposable Subscribe(IObserver<T> observer)
		{
			observer.OnNext(this.value);
			observer.OnCompleted();
			return Disposable.Empty;
		}

		// Token: 0x04000917 RID: 2327
		private readonly T value;
	}
}
